package com.pktechan.api.service.impl;

import com.pktechan.api.base.BaseMapper;
import com.pktechan.api.base.BaseServiceImpl;
import com.pktechan.api.dao.CloudPointMapper;
import com.pktechan.api.entity.CloudPoint;
import com.pktechan.api.service.CloudPointService;
import com.pktechan.api.vo.CloudPointVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service("cloudPointService")
@Transactional
public class CloudPointServiceImpl extends BaseServiceImpl<CloudPoint> implements CloudPointService {

    @Autowired
    private CloudPointMapper cloudPointMapper;

    /**
     * 由业务类实现
     *
     * @return
     */
    @Override
    public BaseMapper<CloudPoint> getBaseMapper() {
        return cloudPointMapper;
    }

    /**
     * 根据客户ID获取积分持仓
     *
     * @param custId
     * @return
     */
    @Override
    public CloudPoint getByCustId(Integer custId) {
        return cloudPointMapper.getByCustId(custId);
    }

    /**
     * 配送中心
     * @param custId
     * @return
     */
    @Override
    public CloudPointVO getDistributionCenter(Integer custId) {
        return cloudPointMapper.getDistributionCenter(custId);
    }


}
